<?php
$v_offset = (isset($_REQUEST["hdn_offset"])) ? $_REQUEST["hdn_offset"] : 0;
$v_num_row = (isset($_REQUEST["hdn_num_row"])) ? $_REQUEST["hdn_num_row"] : SYS_ITEMS_PER_PAGE;


$v_where_clause = " AND NEWS_CATEGORY = '".NEWS_CATEGORY_USER_DIARY."' AND ACCOUNT_ID = '".$user_id."'";
$rs_all_news = getAllNews($v_where_clause,$v_offset ,$v_num_row);
$v_dsp_news_list = '';
$v_inc = 1;
while ( $arr_news = mysql_fetch_array($rs_all_news,MYSQL_NUM)){
	$v_news_id=$arr_news["0"];
	$v_news_content=$arr_news["4"];
	$v_news_time=$arr_news["5"];
	
	$v_dsp_news_list .='
	<div class="diary_element">
		<div class="left diary_time_content w120">
			<span class="diary_date_of_week">'.$arr_day_of_week[date("D",strtotime($v_news_time))].'</span><br/>
			<span class="diary_day">'.date("d",strtotime($v_news_time)).'</span>
			<span class="diary_time">'.date("H:i",strtotime($v_news_time)).'</span>
			<br/>	
			<span class="diary_month_year">'._LB_MONTH.$arr_month[date("M",strtotime($v_news_time))].' '.date("Y",strtotime($v_news_time)).'</span>
		</div>
		<div class="left diary_content">
			<a href="' . URL . $user_name . '/diary' . _LB_REWRITE_URL . '/' . $v_news_id . '">
				'.generateShortDesc($v_news_content,10).'
			</a>
		</div>
		<div class="clear"></div>
	</div>';	
	$v_inc++;

}
$v_dsp_news_list .='';		
$v_number_of_all_result = countAll($v_where_clause,'TB_NEWS');
?>
